﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Data.SqlClient;
using DayPilot.Utils;
using DayPilot.Web;
using DayPilot;
using database_entry;
using database_constants;

public partial class OnCallData : System.Web.UI.Page
{
    private DBQuery DB_ACCESS;
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection conn = new SqlConnection(Constants.DB_CONNECTION);
        DB_ACCESS = new DBQuery(conn, SqlDataSource1, "data");       
    }
    
    protected void CheckBoxList2_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void CheckBoxList3_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
       // DBEntry entry = new DBEntry(int.Parse(TextBox1.Text), int.Parse(TextBox2.Text), TextBox3.Text,
       //     SqlDateTime.Parse(TextBox4.Text), SqlDateTime.Parse(TextBox5.Text), new SqlDateTime(Calendar1.SelectedDate),new SqlDateTime(Calendar2.SelectedDate));
       // DB_ACCESS.InsertItem(entry);
        
    }
    protected void Button7_Click(object sender, EventArgs e)
    {
       // DB_ACCESS.SelectEntriesOnDate(1, new SqlDateTime(DateTime.Now));
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
       // DB_ACCESS.SelectClientEntries(int.Parse(TextBox9.Text));
    }
    protected void Button4_Click(object sender, EventArgs e)
    {
       // DB_ACCESS.SelectEntriesOnDate(1,new SqlDateTime(Calendar3.SelectedDate));
    }
    protected void Button6_Click(object sender, EventArgs e)
    {

    }
    protected void Calendar3_SelectionChanged(object sender, EventArgs e)
    {
       // TextBox14.Text = DB_ACCESS.GetReaderForDate(1, new SqlDateTime(Calendar3.SelectedDate));
    }
    protected void DeleteEntries(object sender, EventArgs e)
    {
        SqlDataSource1.DeleteCommand = "DELETE * FROM data WHERE ClientID = 0";
        SqlDataSource1.Delete();
    }
}